<%@page import="com.yunhuakeji.wddx.utils.IsNull"%>
<%@page import="net.sf.json.JSONObject"%>
<%@page import="net.sf.json.JSONArray"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
JSONObject obj = null;
JSONObject objtmp = null ;
JSONObject tmp;
try{
      //obj = JSONObject.fromObject(request.getAttribute("result"));
      objtmp = JSONObject.fromObject(request.getAttribute("result"));
      if(objtmp.getString("code").equals("40001"))
      {
      	obj = JSONObject.fromObject(JSONObject.fromObject(objtmp.get("content")).get("message"));
      }
      
      
      System.out.print(obj);
}catch(Exception e){
      obj = null;
}
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>每日运动</title>
     <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no,minimum-scale=1.0,maximum-scale=1.0">
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="css/myreport.css">
	<script src="js/jquery.min.js"></script>
	<script src="js/echarts.min.js" type="text/javascript"></script>
	<script src="js/myReport.js"></script>
  </head>
  <style>
  	
  </style>
  <body style="background:#eeeeee;">
    <%if(objtmp.getString("code").equals("40001")){
     %>
     <script>
     
       /* JSONObject tmp = JSONObject.fromObject(JSONObject.fromObject(obj.get("content")).get("message")); */
       
       //排名
       var _pm="<%=obj.getString("pm")%>";
       //本周数据
       var _xdateWeek =<%=obj.getJSONArray("chartByDay").getJSONObject(0).get("xAxisData")%>;
       var _ydataWeek = <%=obj.getJSONArray("chartByDay").getJSONObject(0).get("seriesData")%>;
       //本月数据
       var _xdataMoth = <%=obj.getJSONArray("chartByMonth").getJSONObject(0).get("xAxisData")%>;
       var _xdataMoth = <%=obj.getJSONArray("chartByMonth").getJSONObject(0).get("seriesData")%>;
       //本年数据
       var _xdataYear = <%=obj.getJSONArray("chartByYear").getJSONObject(0).get("xAxisData")%>;
       var _xdataYear = <%=obj.getJSONArray("chartByYear").getJSONObject(0).get("seriesData")%>;
     </script>
  	<!-- home -->
  	<div class="daily" style="background:white;">
    	<div class="daily-date">
    		<a><img alt="" src="images/daily-calendar.png"><span>第<%=obj.getString("djz") %>周</span></a>
    		<a><%=obj.getString("xqj") %>	<%=obj.getString("rq") %></a>
    		<div class="clear"></div>
    	</div>
    	<div class="text-center">
    		<canvas id="gaugechart"></canvas>
    	</div>
    	<div class="daily-describe2">
    		<ul>
    			<li><a>今日运动:<span><%=obj.getString("jrbs") %></span>步</a></li>
    			<div class="clear"></div>
    		</ul>
    	</div>
  	</div>
  	<div class="daily-month1 mt1em bg-color-white">
    		<ul>
    			<li>
    				<div class="week">
    					七日<span></span>
    				</div>
    			</li>
    			<li>
    				<div class="month">
    					本月<span></span>
    				</div>
    				
    			</li>
    			<li>
    				<div class="year">
    					 本年<span></span>
    				</div>
    				
    			</li>
    			<div class="clear"></div>
    		</ul>
    		<div id="echart">
    		
    		</div>
    </div>
    <%} %>
 <script src="js/myreport/sports.js"></script>
  </body>
</html>
